package com.superhelper.common.domain;

import org.apache.commons.lang3.StringUtils;

public enum POIStatusOperator {
    BUSINESS, PLATFORM, UNKOWN;

    // BUSINESS或者MEITUAN
    public static POIStatusOperator mt(String mtOperator) {
        switch (StringUtils.trim(mtOperator).toLowerCase()) {
        case "business":
            return BUSINESS;
        case "meituan":
            return PLATFORM;
        default:
            return UNKOWN;
        }
    }

    // SYSTEM 系统 USER 用户 KEEPER 商户 STAFF 员工
    public static POIStatusOperator ele(String op) {
        switch (StringUtils.trim(op).toLowerCase()) {
        case "keeper":
        case "user":
            return BUSINESS;
        case "system":

        case "staff":
            return PLATFORM;
        default:
            return UNKOWN;
        }
    }

    public static POIStatusOperator bd(String user) {
        if (StringUtils.contains(user, "商户") || StringUtils.contains(user, "商家")) {
            return BUSINESS;
        }
        return PLATFORM;
    }
}
